Repository navigation
fix(daemon): retry provider lease record retirement - #5174
Conversation
Size Report
Startup median (7 runs, lower is better):
|
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding on 135e1df. The verdict and the full list are in the summary comment.
This comment has been minimized.
This comment has been minimized.
|
At 389f688, one problem needs a fix: a close that keeps the daemon registration still stops all later lease record writes.
Not blocking: these can be taken or left: state in the lease contract doc that writes stop at registration handoff and describe the bounded retirement retry; cover the rollback and close calls in runtime-level tests (the close order can share the regression above); mention or move the restart recovery test, which covers unchanged behavior; and run the Two earlier threads no longer apply and can be resolved: late confirmation writes are fixed for shutdown with a final retry, and leaving the record after handoff is intentional (the kept-registration close is the problem above); the unbounded retry loop is gone, because retirement now retries once on a timer. The required evidence is in place. CI checks pass, and Proof is skipped. The cancelled Body rules run was replaced by a passing run on the same commit. Not verified here: no tests or reproduction were run, and the author's local validation was not rerun. The problem and the test gap come from reading the code. No live run shows the late event after a close with unfinished work in a process that stays alive. Before merge, disk writes must stop only when the close releases the registration, with a regression test for the kept-registration route. |
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 35e96ce. The open points from the earlier review are fixed, and only one optional follow-up remains. Not blocking: take this as a follow-up issue or leave it: Two earlier threads no longer apply and can be resolved. In this one, shutdown now retries a failed write before handoff, a late confirmation writes on a retaining close, and after handoff it is left to the successor by design. In this one, the CI is green. One Body rules run was cancelled, but later runs of that job passed on the same commit, and it checks only the PR text. All other checks passed, and Proof was skipped. A trial merge with the newer main reports no conflicts. Not verified here: no tests or reproduction were run, and the author's local validation was not rerun. The regression at 389f688 and the failed-unlink route were judged from the code. The new test asserts only the expired record, so journal writes and a late release after a retaining close were checked by reading the shared persistence gate. Newer main changes Nothing from this review needs to change before merge. |
* origin/main: fix(cli): judge install-from-source lease admission by its daemon command (#5169) ci: report sizes for affected plugins (#5176) fix(ios): keep the zh-Hans alert vocabulary check honest about OS versions (#5177) Consolidate Apple tap and replacement result construction (#5161) fix(daemon): retry provider lease record retirement (#5174)
Summary
Track an expired lease record write independently once the provider confirms release. Retry it while the daemon owns registration and keep the provider result and drain accounting intact.
Before / after
Validation
At
35e96ce62d, 55 focused tests, lint, typecheck, Fallow, andgit diff --checkpassed locally. The new runtime regression confirmed the record remained on disk at389f6889daand was removed after the fix. All 21 hosted checks passed on the same head, Sentinel approved it, and both inline threads are resolved.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.